package com.example.entity;

import com.example.Ordermodule.OrderItemm;
import lombok.Data;

import java.math.BigDecimal;
@Data
public class StandardItem extends OrderItemm {
    private Integer orderItemsId;
    private BigDecimal price;  // 对应 order_items 表的 price
    private Integer orderId;
    private Integer completion;
    private Integer confirmation;
    private Integer stockUp;
    private Integer sendOrder;
    private Integer addressId;
    private String displayStatus;



    @Override
    public BigDecimal calculatePrice() {
        return price.multiply(BigDecimal.valueOf(quantity));
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }
}
